<template>
  <div class="home">
   

    <!-- <button @click="loginOutFunc" v-if="isLogin">退出</button> -->
    <router-view></router-view>
    <!-- <TodoList /> -->
  </div>
</template>


<script setup>
import { useStore } from "vuex";
import { useRouter } from "vue-router";
import { computed } from "vue";
import TodoList from "../components/todolist/TodoList.vue";
import getData from "../components/todolist/data";
const { todoLists, todoTitle, tabList } = getData();
const router = useRouter();
const tab = (index) => {
  this.num = index;
};
const store = useStore();

const loginOutFunc = () => {
  window.sessionStorage.clear();

  store.commit("changeLoginState", false);
  router.push({ path: "/login" });
};
// const tokenStr=window.sessionStorage.getItem("token")

const isLogin = computed(() => store.state.isLogined);

//解耦

// isLogin.value=store.state.isLogined

// console.log('islogin:',isLogin.value)
</script>
<style scoped lang="less">


</style>